home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ssssssssccccaaaallll3333dddd,,,,ddddssssccccaaaallll3333dddd((((3333FFFF)))) ssssssssccccaaaallll3333dddd,,,,ddddssssccccaaaallll3333dddd((((3333FFFF))))
-
-
-
- NNNNAAAAMMMMEEEE
- ssssssssccccaaaallll3333dddd,,,, ddddssssccccaaaallll3333dddd ---- scales 3D real sequence.
-
- SSSSYYYYNNNNOOOOPPPPSSSSYYYYSSSS
- _F_o_r_t_r_a_n :
- ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee ssssssssccccaaaallll3333dddd(((( nnnn1111,,,, nnnn2222,,,, nnnn3333,,,, aaaallllpppphhhhaaaa,,,, aaaarrrrrrrraaaayyyy,,,, llllaaaa1111,,,, llllaaaa2222))))
- iiiinnnntttteeeeggggeeeerrrr nnnn1111,,,, nnnn2222,,,, nnnn3333,,,, llllaaaa1111,,,, llllaaaa2222
- rrrreeeeaaaallll aaaallllpppphhhhaaaa,,,, aaaarrrrrrrraaaayyyy((((llllaaaa1111,,,,llllaaaa2222,,,,nnnn3333))))
- ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee ddddssssccccaaaallll3333dddd(((( nnnn1111,,,, nnnn2222,,,, nnnn3333,,,, aaaallllpppphhhhaaaa,,,, aaaarrrrrrrraaaayyyy,,,, llllddddaaaa))))
- iiiinnnntttteeeeggggeeeerrrr nnnn1111,,,, nnnn2222,,,, nnnn3333,,,, llllaaaa1111,,,, llllaaaa2222
- rrrreeeeaaaallll****8888 aaaallllpppphhhhaaaa,,,, aaaarrrrrrrraaaayyyy((((llllaaaa1111,,,,llllaaaa2222,,,,nnnn3333))))
-
- _C :
- ####iiiinnnncccclllluuuuddddeeee <<<<fffffffftttt....hhhh>>>>
- iiiinnnntttt ssssssssccccaaaallll3333dddd((((iiiinnnntttt nnnn1111,,,,iiiinnnntttt nnnn2222,,,,iiiinnnntttt nnnn3333,,,, ffffllllooooaaaatttt aaaallllpppphhhhaaaa,,,,
- ffffllllooooaaaatttt ****aaaarrrrrrrraaaayyyy,,,,iiiinnnntttt llllaaaa1111,,,, iiiinnnntttt llllaaaa2222))));;;;
- iiiinnnntttt ddddssssccccaaaallll3333dddd((((iiiinnnntttt nnnn1111,,,,iiiinnnntttt nnnn2222,,,,iiiinnnntttt nnnn3333,,,, ddddoooouuuubbbblllleeee aaaallllpppphhhhaaaa,,,,
- ddddoooouuuubbbblllleeee ****aaaarrrrrrrraaaayyyy,,,,iiiinnnntttt llllaaaa1111,,,, iiiinnnntttt llllaaaa2222))));;;;
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- ssssssssccccaaaallll3333dddd and ddddssssccccaaaallll3333dddd scale the 3D real sequence of N1xN2xN3 samples.
- The Fourier Transforms are not normalized so the succession Direct-
- Inverse transform scales the input data by a factor equal to the size of
- the transform. So ssssssssccccaaaallll3333dddd or ddddssssccccaaaallll3333dddd may be used to scale back the
- result.
-
- PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
- NNNN1111 Integer, the first dimension size of the 3D sequence. Unchanged on
- exit.
-
- NNNN2222 Integer, the second dimension size of the 3D sequence. Unchanged on
- exit.
-
- NNNN3333 Integer, the thrid dimension size of the 3D sequence. Unchanged on
- exit.
-
- AAAAllllpppphhhhaaaa scaling floating point value.
-
- AAAARRRRRRRRAAAAYYYY Array containing the samples of the 3D sequence to be transformed.
- On input, the element {i,j,k} of the sequence is stored as A(i,j,k) in
- _F_o_r_t_r_a_n , and A[i+j*la1+k*la1*la2] in _C.
- On exit, the array is overwritten.
-
- LLLLAAAA1111 Integer, first leading dimension: increment between the samples of
- two consecutive 1D sub-sequences (e.g between {i,j+1,k} and {i,j,k} ).
- Unchanged on exit.
-
- LLLLAAAA2222 Integer, second leading dimension: number of the 1D sub-sequence
- between two consecutive 2D sub-sequences (e.g between {i,j,k+1} and
- {i,j,k}). Unchanged on exit.
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ssssssssccccaaaallll3333dddd,,,,ddddssssccccaaaallll3333dddd((((3333FFFF)))) ssssssssccccaaaallll3333dddd,,,,ddddssssccccaaaallll3333dddd((((3333FFFF))))
-
-
-
- EEEExxxxaaaammmmpppplllleeee ooooffff CCCCaaaalllllllliiiinnnngggg SSSSeeeeqqqquuuueeeennnncccceeee
- Given a real sequence of size 100x64x125. We apply successvely the
- Direct FFT, the Inverse FFT, and scale back. The elements of each
- sequence are stored with increment (stride) 1, the offset between the
- first element of two succesive 1D sub-sequences (first leading dimension)
- is 102, and the number of 1D sub-sequence between two succesive 2D sub-
- sequences (second leading dimension) is 64.
- Note : 102 >= 100+2 , and 64 >= 64.
- _F_o_r_t_r_a_n
- real array(0:102-1,0:64-1,0:125-1), alpha
- real coeff(102+15 + 2*(64+15) + 2*(125+15))
- call scfft3dui( 100, 64, 125, coeff)
- call scfft3du( -1, 100, 64, 125, array, 102, 64, coeff)
- call csfft3du( 1, 100, 64, 125, array, 102, 64, coeff)
- alpha = 1./ real(100*64*125)
- call sscal3d( 100, 64, 125, alpha, array, 102, 64)
-
- _C
- #include <fft.h>
- float array[64*102*125], *coeff;
- coeff = scfft3dui( 100, 64, 125, NULL);
- scfft3du( -1, 100, 64, 125, array, 102, 64, coeff);
- csfft3du( 1, 100, 64, 125, array, 102, 64, coeff);
- alpha = 1./(float)(100*64*125);
- sscal3d( 100, 64, 125, alpha, array, 102, 64);
-
- NNNNOOOOTTTTEEEE____1111 :::: The Direct and Inverse transforms should use opposite signs -
- Which one is used (+1 or -1) for Direct transform is just a matter of
- convention-
-
- NNNNOOOOTTTTEEEE____2222 :::: The Fourier Transforms are not normalized so the succession
- Direct-Inverse transform scales the input data by a factor equal to the
- size of the transform.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- fft, scfft3dui, dzfft3dui, scfft3du, dzfft3du, csfft3du, zdfft3du,
- sprod3du, dprod3du
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-